# 生成私钥(Generate a private key) : server.key
openssl genrsa -des3 -out server.key 2048

# Generate a CSR : server.csr
openssl req -new -key server.key -out server.csr

# Remove Passphrase from key : server.key.org 、server.crt
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

# 产生自签名证书(Generate self signed certificate): server.crt
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
